#!/bin/bash

set -e

function usage () {
    echo "Usage: $( basename $0 ) <ara-module-name>"
    echo "    列出一个ara_api模块所直接依赖的其他ara_api模块"
    exit 1
}

if [ $# -ne 1 ]
then 
    usage
fi

ara_mod="$1"

bitbake -q -g "${ara_mod}" > /dev/null
if [[ ! "${ara_mod}" =~ (apd)|(ara) ]]
then
    echo ${ara_mod}
fi
grep -e "\(apd\)\|\(ara\)" pn-buildlist
